﻿using AJWPFAdmin.Core.Logger;
using AJWPFAdmin.Core.Models.EF.Tables;
using AJWPFAdmin.Services.AppointAPI.GoodsInfoQuery;
using FFmpeg.AutoGen;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AJWPFAdmin.Services.EF.TableExts
{
    public partial class WeighingDataCacheExt
    {
        public GoodsInfoQueryBase QueryBase { get; set; }

        private WeighingDataCache _data;

        private AJLog4NetLogger _logger;
        public WeighingDataCache Data
        {
            get => _data;
        }

        public WeighingDataCacheExt(WeighingDataCache data, AJLog4NetLogger logger)
        {
            _data = data;
            _logger= logger;
        }

        public void FillToCar(ref Car carInfo)
        {
            //xiaqiang
            _logger.Error($"WeighingDataCacheExt--FillToCar{JsonConvert.SerializeObject(_data)}");
            QueryBase?.FillGoodsInfo(ref carInfo, _data);
        }
    }
}
